import { createStore } from 'vuex'
/**
 * 创建仓库和导出
 */
export default createStore({
    state: {
        cPath: "/",
        userName: ""
    },
    mutations:{
        //更新当前路径
        "upCurrentPath" : function(state,newPath){
            state.cPath = newPath
        },
        //设置当前登录后全局用户名
        "setUserName" : function(state,userName){
            state.userName = userName
        }
    }
})
